﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace DataAccess
{
    public class GlobalConfiguration
    {
        private static int pageSize;
        private static string siteName;
        private static int descriptionLenght;

        public static int PageSize
        {
            get { return pageSize;}
        }
        public static int DescriptionLenght
        {
            get { return descriptionLenght; }
        }
        public static string SiteName
        {
            get { return siteName; }
        }


        public static int CartPersistDays
        {
            get
            {
                return int.Parse(ConfigurationManager.AppSettings["CartPersistDays"]);
            }
        }

        static GlobalConfiguration()
        {
            pageSize = Convert.ToInt32(ConfigurationManager.AppSettings["PageSize"]);
            descriptionLenght = Convert.ToInt32(ConfigurationManager.AppSettings["DesLenght"]);
            siteName = ConfigurationManager.AppSettings["SiteName"];
        }
    }
}
